package com.lemon.rule.express.parse;

public class KeyWordDefine4SQL {
    public String[] splitWord = { "+", "-", "*", "/", //�������㣺
    ".", ",", ":", ";", "(", ")", "[", "]", "{", "}", "?", //�ָ�����
    "!", "<", ">", "<=", ">=", "<>", "=" };
    public String[] keyWords = new String[] { "select", "from", "where", "and", "or", "like", "if", "then", "else", "as" };
    public String[] nodeTypeDefines = new String[] { "in:TYPE=KEYWORD", "EOF:TYPE=WORDDEF", "FUNCTION_NAME:TYPE=WORDDEF", "FUNCTION_DEFINE:TYPE=WORDDEF", "ID:TYPE=WORDDEF", "LEFT_BRACKET:TYPE=WORDDEF,DEFINE=(", "RIGHT_BRACKET:TYPE=WORDDEF,DEFINE=)",

            "CONST_BYTE:TYPE=WORDDEF", "CONST_SHORT:TYPE=WORDDEF", "CONST_INTEGER:TYPE=WORDDEF", "CONST_LONG:TYPE=WORDDEF", "CONST_FLOAT:TYPE=WORDDEF", "CONST_DOUBLE:TYPE=WORDDEF", "CONST_NUMBER:TYPE=WORDDEF,DEFINE=CONST_BYTE|CONST_SHORT|CONST_INTEGER|CONST_LONG|CONST_FLOAT|CONST_DOUBLE", "CONST_CHAR:TYPE=WORDDEF", "CONST_STRING:TYPE=WORDDEF", "CONST_BOOLEAN:TYPE=WORDDEF", "CONST_CLASS:TYPE=WORDDEF", "CONST:TYPE=GROUP,DEFINE=CONST_NUMBER|CONST_CHAR|CONST_STRING|CONST_BOOLEAN|CONST_CLASS",

            //				"():TYPE=BLOCK,STARTTAG=(,ENDTAG=)",
            //				"[]:TYPE=BLOCK,STARTTAG=[,ENDTAG=]",
            //				"{}:TYPE=BLOCK,STARTTAG={,ENDTAG=}",
            //				"EXPRESS_CHILD:TYPE=GROUP,DEFINE=()|[]",

            "OP_LEVEL1:TYPE=OPERATOR,DEFINE=!", "OP_LEVEL2:TYPE=OPERATOR,DEFINE=*|/", "OP_LEVEL3:TYPE=OPERATOR,DEFINE=+|-", "OP_LEVEL4:TYPE=OPERATOR,DEFINE=in|like", "OP_LEVEL5:TYPE=OPERATOR,DEFINE=>|>=|<|<=|=|<>", "OP_LEVEL6:TYPE=OPERATOR,DEFINE=and", "OP_LEVEL7:TYPE=OPERATOR,DEFINE=or",

            "TAB_COL_NAME:TYPE=STATEMENT,DEFINE=ID$(.$ID)*#TAB_COL_NAME", "CHILD_EXPRESS:TYPE=EXPRESS,DEFINE=LEFT_BRACKET~$EXPRESS$RIGHT_BRACKET~", "OPDATA:TYPE=EXPRESS,DEFINE=CHILD_EXPRESS|CONST|TAB_COL_NAME", "TAB_COL_NAME_ALIAS:TYPE=STATEMENT,DEFINE=TAB_COL_NAME$(as^$TAB_COL_NAME){0:1}", "TAB_COL_LIST:TYPE=STATEMENT,DEFINE=TAB_COL_NAME_ALIAS$(,~$TAB_COL_NAME_ALIAS)*",

            "EXPRESS_OP_L1:TYPE=EXPRESS,DEFINE=OP_LEVEL1^*$OPDATA", "EXPRESS_OP_L2:TYPE=EXPRESS,DEFINE=EXPRESS_OP_L1$(OP_LEVEL2^$EXPRESS_OP_L1)^*", "EXPRESS_OP_L3:TYPE=EXPRESS,DEFINE=EXPRESS_OP_L2$(OP_LEVEL3^$EXPRESS_OP_L2)^*", "EXPRESS_OP_L4:TYPE=EXPRESS,DEFINE=EXPRESS_OP_L3$(OP_LEVEL4^$EXPRESS_OP_L3)^*", "EXPRESS_OP_L5:TYPE=EXPRESS,DEFINE=EXPRESS_OP_L4$(OP_LEVEL5^$EXPRESS_OP_L4)^*", "EXPRESS_OP_L6:TYPE=EXPRESS,DEFINE=EXPRESS_OP_L5$(OP_LEVEL6^$EXPRESS_OP_L5)^*", "EXPRESS_OP_L7:TYPE=EXPRESS,DEFINE=EXPRESS_OP_L6$(OP_LEVEL7^$EXPRESS_OP_L6)^*",

            "EXPRESS:TYPE=STATEMENT,DEFINE=EXPRESS_OP_L7",

            "OP_LIST:TYPE=GROUP,DEFINE=OP_LEVEL1|OP_LEVEL2|OP_LEVEL3|OP_LEVEL4|OP_LEVEL5|OP_LEVEL6|OP_LEVEL7|LEFT_BRACKET|RIGHT_BRACKET|[|]", "PARAMETER_LIST:TYPE=STATEMENT,DEFINE=EXPRESS$(,~$EXPRESS)*", "SELECT:TYPE=STATEMENT,DEFINE=(select^$TAB_COL_LIST)$(from^$PARAMETER_LIST)$(where^$EXPRESS){0:1}#SELECT",

            "STATEMENT:TYPE=STATEMENT", "PROGRAM:TYPE=STATEMENT,DEFINE=SELECT",

    };
}
